package com.ep.instruktor.harmonogram.db;

import com.ep.general.kursant.Kursant;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.annotations.Expose;

public class HarmonogramKursant {

	private int id;
	@Expose
	private Kursant kursant;
	private HarmonogramKursu harmonogram;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Kursant getKursant() {
		return kursant;
	}

	public void setKursant(Kursant kursant) {
		this.kursant = kursant;
	}

	public HarmonogramKursu getHarmonogram() {
		return harmonogram;
	}

	public void setHarmonogram(HarmonogramKursu harmonogram) {
		this.harmonogram = harmonogram;
	}

	public String getAsJson() {
		GsonBuilder gsonBuilder = new GsonBuilder();
		gsonBuilder.excludeFieldsWithoutExposeAnnotation().setDateFormat("dd-MM-yyyy").create();
		Gson gson = gsonBuilder.create();

		return gson.toJson(this);
	}
}
